<?php
    // Database credentials
    define('DB_HOST', 'localhost');
    define('DB_USER', 'root');
    define('DB_PASS', 'byt3fact@4230');
    define('DB_NAME', 'autores_db');

    // Set the error reporting level
    error_reporting(E_ALL);
    ini_set("display_errors", 1);
	
    // Create a database object
    try {
        $dsn = "mysql:host=".DB_HOST.";dbname=".DB_NAME;
        $db = new PDO($dsn, DB_USER, DB_PASS);
    } catch (PDOException $e) {
        echo 'Connection failed: ' . $e->getMessage();
        exit;
    }
?>
